package com.zpark.service.impl;

import com.zpark.service.IUserService;
import com.zpark.service.exception.DataContentException;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @PackageName: com.zpark.service.impl
 * @ClassName: UserServiceImpl
 * @Description:
 * @author: RZS
 * @date: 2022/9/22  17:19
 */
@Service
public class UserServiceImpl implements IUserService {

    @Override
    public List<Integer> test(Integer num) throws DataContentException {
        // 处理业务....
        // 校验数据，假设数据不合法
        if (num > 100) {
            throw new DataContentException("num大于100，数据不合法");
        }
        // 后续业务处理
        return null;
    }
}
